#include "UdpServer.hpp"
#include <memory>

void Useage(const std::string& s)
{
    std::cout << "Useage" << ":\n\t" << s << " port\n";
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Useage(argv[0]);
        exit(0);
    }

    uint16_t port = std::stoi(argv[1]);

    std::unique_ptr<UdpServer> uq = std::make_unique<UdpServer>(port);
    uq->InitServer();
    uq->Loop();
    return 0;
}